package co.sumset.vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;

import javax.swing.JButton;
import javax.swing.JLabel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;



/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaPausa extends javax.swing.JFrame implements ActionListener
{
	private Administrador admin;
	private JLabel etqInfo;
	private JButton botonContinuar1;
	private JButton jButton1;
	private JButton botonContinuar;
	private JButton jButton2;

	public VentanaPausa(Administrador admin) 
	{
		super();
		initGUI();
		this.admin=admin;
	}
	
	private void initGUI() 
	{
		try 
		{
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setTitle("Pausa");
			
			{
				botonContinuar1 = new JButton();
				getContentPane().add(botonContinuar1);
				botonContinuar1.setText("Reiniciar Juego");
				botonContinuar1.setBounds(46, 120, 104, 43);
				botonContinuar1.addActionListener(this);
			}
			{
				jButton1 = new JButton();
				getContentPane().add(jButton1);
				jButton1.setText("Instrucciones");
				jButton1.setBounds(46, 174, 104, 43);
				jButton1.addActionListener(this);
			}
			{
				jButton2 = new JButton();
				getContentPane().add(jButton2);
				jButton2.setText("Salir");
				jButton2.setBounds(46, 228, 104, 43);
				jButton2.addActionListener(this);
			}
			{
				botonContinuar = new JButton();
				getContentPane().add(botonContinuar);
				botonContinuar.setText("Continuar");
				botonContinuar.setBounds(46, 66, 104, 43);
				botonContinuar.addActionListener(this);
			}
			{
				etqInfo = new JLabel();
				getContentPane().add(etqInfo);
				etqInfo.setBounds(0, 0, 210, 330);
				etqInfo.setIcon(new ImageIcon(getClass().getClassLoader().getResource("res/fondos/fondo4.png")));
			}
			pack();
			this.setSize(210, 330);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	@Override
	public void actionPerformed(ActionEvent e) 
	{
		if(e.getSource()==botonContinuar1)
		{
			admin.setPause(false);
			this.setVisible(false);
		}
	}

}
